<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<body>

<div th:fragment="foot">

    <!--我想拍-->
    <div class="mypai">
        <a href="javascript:void(0)" data-toggle="modal" data-target=".bs-example-modal-paishe" onclick="return false;">
            <img th:src="@{/static/m/img/woxiangpai.png}"/>
        </a>
    </div>

    <!--我想拍弹框-->
    <div class="modal fade bs-example-modal bs-example-modal-paishe" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <form name="iwantForm">
                    <h3>我想拍</h3>
                    <input type="text" name="personName" value="" placeholder="姓名" />
                    <input type="text" name="personPhone" value="" placeholder="电话" />
                    <input type="text" name="personWechat" value="" placeholder="微信" />
                    <textarea class="xp-textarea" name="personExpect" rows="" cols="" placeholder="期望"></textarea>
                    <div class="bottom-btn">
                        <input type="button" class="xp-btn" id="i-want-submit-btn" value="提交" />
                        <button type="button" class="xp-btn" style="margin-right: 0;" onclick="$('.bs-example-modal-paishe').modal('hide'); $('#nb_invite_ok').click();">在线咨询</button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <!--底部版权信息-->
    <div class="footwrap">
        <div class="top clearfix">
            <div class="logo">
                <img th:src="@{'/static/m/img/logo.png'}"/>
            </div>
            <div class="text">
                <ul class="clearfix">
                    <li>
                        <a th:href="@{'/brand?type=about&m=1'}">关于巨桃游娱</a>
                    </li>
                    <li>
                        <a th:href="@{'/brand?type=business&m=1'}">商务合作</a>
                    </li>
                    <li>
                        <a th:href="@{'/brand?type=join&m=1'}">权益保障</a>
                    </li>
                    <li>
                        <a th:href="@{'/brand?type=platform&m=1'}">法律信息</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="bottom">
            <p><a href="https://icp.chinaz.com/info?q=lua-lu.com" style="color: #a0a0a0">津ICP备2021006238号-1</a> &nbsp;&nbsp;巨桃游娱（天津）信息科技有限公司 &nbsp;&nbsp;<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802027746" style="color: #a0a0a0">京公网安备 11010802027761号</a></p>
        </div>
    </div>

    <!-- 联系拨打电话模态窗 -->
    <div class="modal fade bs-example-modal bs-example-modal-lianxi" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <h3>确定拨打售前热线400-006-9858</h3>
                <p>营业时间 周一到周五9:00-18:00</p>
                <a href="javascript: window.location.href = 'tel:' + '400-006-9858';" class="btn">确定</a>
                <a href="javascript:void(0)" class="btn" data-toggle="modal" data-target=".bs-example-modal-lianxi" style="background: #a0a0a0; margin-right: 0;">取消</a>
            </div>
        </div>
    </div>

    <!-- 关注微信模态窗 -->
    <div class="modal fade bs-example-modal bs-example-modal-erweima" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="erweima-con clearfix">
                    <div class="left-text">
                        <ul>
                            <li>1、打开微信选择右上角“+”图标，选择“添加朋友”。</li>
                            <li>2、点击最下面的“公众号”。</li>
                            <li>3、在搜索栏输入“巨桃游娱”。</li>
                            <li>4、点击关注，即可收到推送，查看历史图文。</li>
                        </ul>
                    </div>
                    <div class="right-img">
                        <img th:src="@{/static/m/img/erweima.jpg}"/>
                        关注微信公众号
                    </div>
                </div>
                <a th:href="@{/static/m/img/erweima.jpg}" download="erweima.jpg" class="btn">保存二维码</a>
                <a href="javascript:void(0)" class="btn" data-toggle="modal" data-target=".bs-example-modal-erweima" style="background: #a0a0a0; margin-right: 0;">取消</a>
            </div>
        </div>
    </div>

    <!-- 未登录模态窗 -->
    <div class="modal fade bs-example-modal bs-example-modal-login" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <img th:src="@{/static/m/img/my-img.png}" class="my-img"/>
                <h3>您还未登录</h3>
                <p>（请先登录/注册再执行此操作）</p>
                <a th:href="@{/personal}" class="btn">登录</a>
                <a th:href="@{/register}" class="register">去注册？</a>
            </div>
        </div>
    </div>

    <!-- 底部导航栏 -->
    <div class="foot-nav">
        <dl class="on" data-toggle="modal" data-target=".bs-example-modal-lianxi" onclick="return false;">
            <dt>
                <i></i>
            </dt>
            <dd>
                联系
            </dd>
        </dl>
        <dl onclick="$('#nb_invite_ok').click();">
            <dt>
                <i></i>
            </dt>
            <dd>
                咨询
            </dd>
        </dl>
        <dl data-toggle="modal" data-target=".bs-example-modal-erweima" onclick="return false;">
            <dt>
                <i></i>
            </dt>
            <dd>
                微信
            </dd>
        </dl>

        <dl th:if="${#authentication.principal ne 'anonymousUser'}">
            <a th:href="@{/personal}">
                <dt>
                    <i></i>
                </dt>
                <dd>
                    我的
                </dd>
            </a>
        </dl>

        <dl th:if="${#authentication.principal eq 'anonymousUser'}" data-toggle="modal" data-target=".bs-example-modal-login" onclick="return false;">
            <dt>
                <i></i>
            </dt>
            <dd>
                我的
            </dd>
        </dl>
    </div>

</div>

<div th:fragment="footer(plugin)">
    <script type="text/javascript" th:src="@{'/static/common/jquery.min.js?v=0.1'}"></script>
    <script type="text/javascript" th:src="@{'/static/m/js/bootstrap.min.js?v=0.1'}"></script>
    <script type="text/javascript" th:src="@{'/static/m/js/TouchSlide.1.1.js?v=1.1'}"></script>

    <!--/* 百度统计 */-->
    <script type="text/javascript" src="https://hm.baidu.com/hm.js?0f036137ec0ee6acb617540c6e2d8d51" th:if="${plugin ne 'baidu.hide'}"></script>

    <script type="text/javascript" th:src="@{'/static/common/constant.js?v=0.1'}"></script>
    <script type="text/javascript" th:src="@{'/static/common/tools/tools.extend.js?v=0.1'}"></script>
    <script type="text/javascript" th:src="@{'/static/common/tools/tools.validate.js?v=0.1'}"></script>

    <script type="text/javascript" th:src="@{'/static/m/js/home.js?v=0.1'}"></script>

    <script>
        TouchSlide({
            slideCell: "#focus",
            titCell: ".hd li",
            mainCell: ".bd ul",
            effect: "left",
            autoPlay: true,
            interTime: 5000
        });

        $(function () {
            /**
             * 我想拍提交
             */
            $('#i-want-submit-btn').click(function () {
                var data = $('form[name="iwantForm"]').serializeObject();
                if (!Pattern.NAME.test(data.name)) {
                    alert('姓名格式错误');
                    return false;
                }

                if (!Pattern.CHINA_MOBILE.test(data.telephone)) {
                    alert('电话格式错误');
                    return false;
                }

                if (!Pattern.WECHAT.test(data.wechat)) {
                    alert('微信格式错误');
                    return false;
                }

                if ($.trim(data.expect).length == 0) {
                    alert('请简单描述您的需求, 300字以内');
                    return false;
                }

                $.ajax({
                    type: 'post',
                    url: '/workorder/add',
                    data: data,
                    dataType: 'json',
                    beforeSend: function(xhr) {
                        xhr.setRequestHeader($("meta[name='_csrf_header']").attr("content"), $("meta[name='_csrf']").attr("content"));
                    },
                    success: function (result) {
                        if (result.status == Messages.HTTP_STATUS.SUCCESS) {
                            if (result.data == true) {
                                alert('提交成功, 稍候客服会与您沟通!')
                                $('.bs-example-modal-paishe').modal('hide');
                                return true;
                            }
                        }
                        alert(Messages.ERROR);
                    },
                    error: function () {
                        alert(Messages.ERROR);
                    }
                })
            })

        })
    </script>
</div>

</body>
</html>